<?php
namespace Macaca\Model\Admin;

use Macaca\Model\Base;
use Monkey;

class Page extends Base {

    public $table = 'page'; //`page_id`, `p_name`, `p_caption`, `content`, `keywords`, `description`
    public $priKey = 'page_id';

    /**
     * @param int $page
     * @param int $pageLength
     * @return array
     */
    public function findList($page = 0, $pageLength = 10) {
        return $this->conn->select($this->table)
            ->fields('page_id', 'p_name', 'p_caption')
            ->range($pageLength, $page*$pageLength)
            ->execute()->fetchAll();
    }

}